/****************************************************************
** Tutorial_Arduino_Digital_Read                          
**
** Original Author:      Sammy_K
** Webpage:              www.dreamgineer.org
**  
** Project:              Dreamgineer Tutorials: Arduino
** Written On:           May 2012
** Last Updated:         May 2012
**
** A Simple Arduino Example That 'Displays' The Value From Pin 8
** On The LED Attached To Pin 13.
**
****************************************************************/

/****************************************************************
** setup() - Executes Once On Boot
**
** Configure Pin 8 As Digital Input
** Configure Pin 13 As Output To Drive LED
**
****************************************************************/
void setup()
{
  pinMode(8, INPUT);    //Set Pin 8 As Digital Input
  pinMode(13, OUTPUT);  //Set Pin 13 As Digital Output
}

/****************************************************************
** loop() - Executes Repeatadly After setup() returns.
**
** 'Displays' The Value Read On Pin 8 On The Built In LED 
** Attached To Pin 13.
**
****************************************************************/
void loop()
{
  //Write The Value Read From Pin 8 To Pin 13
  digitalWrite(13, digitalRead(8));  
}


/****************************************************************
** Copyright (c) Dreamgineer.org
**
** Permission to use, copy, modify, and distribute this software 
** for any purpose with or without fee is hereby granted, 
** provided that the above copyright notice and this permission 
** notice appear in all copies. 
**
** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL 
** THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
** CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
** FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF 
** CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
** OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
****************************************************************/
